package com.karateca.columbiaimports;

import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;

/**
 * Represents an empty map that return the same value. The value is specified
 * in the constructor.
 * @author Andres Dominguez
 */
public class EmptyMap implements Map
{
    private String returnValue;

    public EmptyMap(String returnValue)
    {
        this.returnValue = returnValue;
    }

    public int size()
    {
        return 0;
    }

    public boolean isEmpty()
    {
        return true;
    }

    public boolean containsKey(Object key)
    {
        return true;
    }

    public boolean containsValue(Object value)
    {
        return true;
    }

    public Object get(Object key)
    {
        return this.returnValue;
    }

    public Object put(Object key, Object value)
    {
        return null;
    }

    public Object remove(Object key)
    {
        return null;
    }

    public void putAll(Map m)
    {
    }

    public void clear()
    {
    }

    public Set keySet()
    {
        return Collections.EMPTY_SET;
    }

    public Collection values()
    {
        return Collections.EMPTY_LIST;
    }

    public Set entrySet()
    {
        return Collections.EMPTY_SET;
    }
}
